package com.ag.bean;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbTaskResourseId entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbTaskResourseId implements java.io.Serializable {

	// Fields

	private String TId;
	private String goodsId;

	// Constructors

	/** default constructor */
	public TbTaskResourseId() {
	}

	/** full constructor */
	public TbTaskResourseId(String TId, String goodsId) {
		this.TId = TId;
		this.goodsId = goodsId;
	}

	// Property accessors

	@Column(name = "T_ID", nullable = false, length = 20)
	public String getTId() {
		return this.TId;
	}

	public void setTId(String TId) {
		this.TId = TId;
	}

	@Column(name = "GOODS_ID", nullable = false, length = 14)
	public String getGoodsId() {
		return this.goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbTaskResourseId))
			return false;
		TbTaskResourseId castOther = (TbTaskResourseId) other;

		return ((this.getTId() == castOther.getTId()) || (this.getTId() != null
				&& castOther.getTId() != null && this.getTId().equals(
				castOther.getTId())))
				&& ((this.getGoodsId() == castOther.getGoodsId()) || (this
						.getGoodsId() != null
						&& castOther.getGoodsId() != null && this.getGoodsId()
						.equals(castOther.getGoodsId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTId() == null ? 0 : this.getTId().hashCode());
		result = 37 * result
				+ (getGoodsId() == null ? 0 : this.getGoodsId().hashCode());
		return result;
	}

}